package com.youyi.yychosesdk.setting;

import com.youyi.yychosesdk.constant.Type;
import com.youyi.yychosesdk.engine.ImageEngine;
import com.youyi.yychosesdk.models.album.entity.Photo;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;

public class Setting {
    public static final int BOTTOM_RIGHT = 1;
    public static final int LIST_FIRST = 0;
    public static boolean albumItemsAdIsOk = false;
    public static int cameraLocation = 1;
    public static int complexPictureCount = 0;
    public static boolean complexSelector = false;
    public static boolean complexSingleType = false;
    public static int complexVideoCount = 0;
    public static int count = 1;
    public static String fileProviderAuthority = null;
    public static List<String> filterTypes = new ArrayList();
    public static ImageEngine imageEngine = null;
    public static boolean isSequentialSelectedPhotos = true;
    public static boolean isShowCamera = false;
    public static int minHeight = 1;
    public static long minSize = 1;
    public static int minWidth = 1;
    public static boolean onlyStartCamera = false;
    public static String originalMenuUnusableHint = "";
    public static boolean originalMenuUsable = false;
    public static boolean photoAdIsOk = false;
    public static boolean selectedOriginal = false;
    public static ArrayList<Photo> selectedPhotos = new ArrayList<>();
    public static boolean showCleanMenu = true;
    public static boolean showGif = false;
    public static boolean showOriginalMenu = false;
    public static boolean showVideo = false;
    public static boolean useWidth = false;
    public static long videoMaxSecond = Long.MAX_VALUE;
    public static long videoMinSecond = 0;

    @Retention(RetentionPolicy.SOURCE)
    public @interface Location {
    }

    public static void clear() {
        minWidth = 1;
        minHeight = 1;
        minSize = 1;
        count = 1;
        photoAdIsOk = false;
        albumItemsAdIsOk = false;
        selectedPhotos.clear();
        showOriginalMenu = false;
        originalMenuUsable = false;
        originalMenuUnusableHint = "";
        selectedOriginal = false;
        cameraLocation = 1;
        isShowCamera = false;
        onlyStartCamera = false;
        filterTypes = new ArrayList();
        showGif = false;
        showVideo = false;
        showCleanMenu = true;
        videoMinSecond = 0;
        videoMaxSecond = Long.MAX_VALUE;
        complexSelector = false;
        complexSingleType = false;
        complexVideoCount = 0;
        complexPictureCount = 0;
        isSequentialSelectedPhotos = true;
    }

    public static boolean isFilter(String str) {
        String lowerCase = str.toLowerCase();
        for (String str2 : filterTypes) {
            if (lowerCase.contains(str2)) {
                return true;
            }
        }
        return false;
    }

    public static boolean isOnlyVideo() {
        return filterTypes.size() == 1 && filterTypes.get(0).equals(Type.VIDEO);
    }

    public static boolean isOnlyGif() {
        return filterTypes.size() == 1 && filterTypes.get(0).equals(Type.GIF);
    }

    public static boolean isBottomRightCamera() {
        return cameraLocation == 1;
    }
}
